package com.ruoyi.project.channel.channelScoreSetting.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.channel.channelScoreSetting.mapper.ChannelScoreSettingMapper;
import com.ruoyi.project.channel.channelScoreSetting.domain.ChannelScoreSetting;
import com.ruoyi.project.channel.channelScoreSetting.service.IChannelScoreSettingService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 跑分配置 服务层实现
 * 
 * @author CAIN
 * @date 2019-10-21
 */
@Service
public class ChannelScoreSettingServiceImpl implements IChannelScoreSettingService 
{
	@Autowired
	private ChannelScoreSettingMapper channelScoreSettingMapper;

	/**
     * 查询跑分配置信息
     * 
     * @param scoreId 跑分配置ID
     * @return 跑分配置信息
     */
    @Override
	public ChannelScoreSetting selectChannelScoreSettingById(Long scoreId)
	{
	    return channelScoreSettingMapper.selectChannelScoreSettingById(scoreId);
	}
	
	/**
     * 查询跑分配置列表
     * 
     * @param channelScoreSetting 跑分配置信息
     * @return 跑分配置集合
     */
	@Override
	public List<ChannelScoreSetting> selectChannelScoreSettingList(ChannelScoreSetting channelScoreSetting)
	{
	    return channelScoreSettingMapper.selectChannelScoreSettingList(channelScoreSetting);
	}
	
    /**
     * 新增跑分配置
     * 
     * @param channelScoreSetting 跑分配置信息
     * @return 结果
     */
	@Override
	public int insertChannelScoreSetting(ChannelScoreSetting channelScoreSetting)
	{
	    return channelScoreSettingMapper.insertChannelScoreSetting(channelScoreSetting);
	}
	
	/**
     * 修改跑分配置
     * 
     * @param channelScoreSetting 跑分配置信息
     * @return 结果
     */
	@Override
	public int updateChannelScoreSetting(ChannelScoreSetting channelScoreSetting)
	{
	    return channelScoreSettingMapper.updateChannelScoreSetting(channelScoreSetting);
	}

	/**
     * 删除跑分配置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteChannelScoreSettingByIds(String ids)
	{
		return channelScoreSettingMapper.deleteChannelScoreSettingByIds(Convert.toStrArray(ids));
	}
	
}
